package edu.uow.devdocs
/**
 * The Status entity.
 *
 * @author    
 *
 *
 */
class Status {
    static mapping = {
         table 'STATUS'
         // version is set to false, because this isn't available by default for legacy databases
         version false
         id column:'STATUS_ID'
		 id generator: 'sequence', params:[sequence:'STATUS_SEQ']
         statusType column:'STATUS_TYPE_ID'
    }
    String status
    Date lastUpdated
    Boolean activeFlag = true
    // Relation
    StatusType statusType

    static constraints = {
        status(size: 0..50)
        lastUpdated(nullable: true)
        activeFlag(nullable: false)
        statusType()
    }
    String toString() {
        return "${status}" 
    }
}
